﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Medianamik.Core.Interfaces;
using System.Reflection;

namespace Medianamik.Core
{
    public class SchemaChange : ISchemaChange
    {
        #region ISchemaChange Members

        public DateTime? DateApplied
        {
            get;
            set;
        }

        public string MajorReleaseNumber
        {
            get;
            set;
        }

        public string MinorReleaseNumber
        {
            get;
            set;
        }

        public string PointReleaseNumber
        {
            get;
            set;
        }

        public string ScriptName
        {
            get;
            set;
        }

        public string ResourceName
        {
            get
            {
                return  "DB.ChangeScripts." + ScriptName;
            }
        }

        public bool ResourceExists
        {
            get
            {
                return Sugar.Resources.ManifestResourceExist(ResourceName, Assembly.GetExecutingAssembly());
            }
        }

        #endregion
    }
}
